#include<bits/stdc++.h>
using namespace std;

int n, ans, len = 1, f[5005][5005];

int main()
{   
    cin >> n;
    f[1][1] = 1; f[2][1] = 2;
    for(int i = 3; i <= n; i++){
    	for(int j = 1; j <= len; j++){
    		f[i][j] = f[i-1][j] + f[i-2][j];
		}
		for(int j = 1; j <= len; j++){
			f[i][j+1] += f[i][j] / 10;
			f[i][j] %= 10;
		}
		if(f[i][len+1]) len++;	
		
	}
    for(int i = len; i >= 1; i--)
    cout << f[n][i]; 
	return 0;
}
